package com.lingz.manager.modules.wuxue.serviceimpl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.lingz.manager.base.DevplatBaseDao;
import com.lingz.manager.modules.wuxue.dao.IndSerCentreDao;
import com.lingz.manager.modules.wuxue.mapper.IndSerCentreMapper;
import com.lingz.manager.modules.wuxue.entity.IndSerCentre;
import com.lingz.manager.modules.wuxue.service.IndSerCentreService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Slf4j
@Service
@Transactional
public class IndSerCentreServiceImpl implements IndSerCentreService {
    @Autowired
    IndSerCentreDao indSerCentreDao;

    @Autowired
    IndSerCentreMapper indSerCentreMapper;
    @Override
    public DevplatBaseDao<IndSerCentre, String> getRepository() {
        return indSerCentreDao;
    }

    @Override
    public List<IndSerCentre> findListIndSerCentre(IndSerCentre indSerCentre) {
        LambdaQueryWrapper<IndSerCentre> wrapper = Wrappers.lambdaQuery(IndSerCentre.class);
        List<IndSerCentre> list = indSerCentreMapper.selectList(wrapper);
        return list;
    }

    @Override
    public IndSerCentre findIndSerCentreById(int id) {
        return indSerCentreMapper.selectById(id);
    }
}
